﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home/HomePage.master" AutoEventWireup="true"
    CodeFile="MyEvaluate.aspx.cs" Inherits="Home_MyEvaluate" %>

<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="Server">
    <title>我的评价</title>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
    <div id="bulkRight">
        <div class="titleSix">
            我的评价</div>
        <script type="text/javascript">
            function goPage(page) {
                window.location.href = "/home/myevaluate.aspx?page=" + page; ;
            }
        </script>
        <div class="orderInfor">
            
           <table width="100%" border="0" cellpadding="0" cellspacing="0" class="orderstable">
                <tr    class="orderTr" >
                    <td height="25" align="center"  class="orderTdOne">
                        评价商品
                    </td>
                    <td height="25" align="center"  class="orderTdOne">
                        评分
                    </td>
                    <td height="25" align="center"  class="orderTdOne">
                        评价内容
                    </td>
                    <td height="25" align="center" class="orderTdOne">
                        评价时间
                    </td>
                </tr>
                <%if (_goodsEvalList != null && _goodsEvalList.Count > 0)
                  {
                      for (var i = 0; i < _goodsEvalList.Count; i++)
                      { %>
                <tr class="orderTr">
                    <td height="25" align="center"  class="orderTdTwo">
                        <%=_goodsEvalList[i].GoodsName%>
                    </td>
                    <td height="25" align="center"  class="orderTdTwo">
                        <%=_goodsEvalList[i].StarImgsHtml%>
                    </td>
                    <td height="25" align="center" class="orderTdTwo">
                        <%=_goodsEvalList[i].Evaluate.EvaluateContent%>
                    </td>
                    <td height="25" align="center"  class="orderTdTwo">
                        <%=_goodsEvalList[i].Evaluate.EvaluateDate%>
                    </td>
                </tr>
                <%}
                      if (asPage.TotalCount > _pageSize)
                      {
                          var totalPage = asPage.TotalCount % _pageSize == 0 ? asPage.TotalCount / _pageSize : (asPage.TotalCount / _pageSize + 1);
                %>
                <tr class="orderTr">
                    <td colspan="5"  class="orderTdTwo">
                        <a href="javascript:void(0);" onclick="goPage(<%=asPage.CurPage-1>0?asPage.CurPage-1:0 %>);">
                            [上一页]</a> <a href="javascript:void(0);" onclick="goPage(<%=asPage.CurPage+1>totalPage?totalPage:(asPage.CurPage+1) %>);">
                                [下一页]</a>
                    </td>
                </tr>
                <%
                    }

                  }
                  else
                  {%>
                   <tr class="orderTr">
                    <td colspan="5"  class="orderTdTwo">
                        [ 您还没有发表任何商品评价信息！]
                    </td>
                </tr>
                  <%} %>
            </table>
        </div>
    </div>
</asp:Content>
